Skip to content

Refresh LangGraph Couchbase persistence notebook#116

Merged
ejscribner merged 3 commits into
mainfrom
artifact/langgraph-couchbase-persistence-2026-04-28
May 4, 2026
Merged

Refresh LangGraph Couchbase persistence notebook#116
ejscribner merged 3 commits into
mainfrom
artifact/langgraph-couchbase-persistence-2026-04-28

Conversation

@dex-the-ai
Copy link
Copy Markdown
Contributor

@dex-the-ai dex-the-ai commented Apr 28, 2026

Summary

  • refresh langgraph/couchbase_persistence_langgraph.ipynb so it runs non-interactively with env-driven OpenAI and local Couchbase settings
  • keep the existing langgraph install pinned, but update that pin to the latest tested version (1.1.10) and include langchain-openai alongside the current Couchbase checkpointer package
  • address the LangGraph deprecation feedback by switching the notebook example from create_react_agent to create_agent in the sync and async flows
  • tighten the notebook setup text for the local test / langgraph checkpoint collections

Verification

  • uv venv -p 3.12 --seed --clear .venv
  • python -m pip install -U papermill nbclient jupyter ipykernel
  • python -m pip install -U pip-audit
  • pip-auditno known vulnerabilities
  • papermill -k vsc-langgraph-312 langgraph/couchbase_persistence_langgraph.ipynb tutorial-maintenance/runs/couchbase-examples__vector-search-cookbook/2026-04-28-langgraph-couchbase-persistence/couchbase_persistence_langgraph.executed.ipynb

Evidence

  • sync and async LangGraph checkpoint flows both executed successfully against local Couchbase
  • the notebook now reads OPENAI_API_KEY, CB_CONN_STR, CB_USER, CB_PASS, CB_BUCKET_NAME, and CB_SCOPE_NAME from the environment instead of hard-coding local credentials
  • visual evidence is included for the rendered executed notebook output tied to this PR

Rendered notebook screenshot

Rendered LangGraph notebook output

  • tutorial-maintenance/runs/couchbase-examples__vector-search-cookbook/2026-04-28-langgraph-couchbase-persistence/verification.md — run summary, deprecation-fix note, and local setup notes

  • tutorial-maintenance/runs/couchbase-examples__vector-search-cookbook/2026-04-28-langgraph-couchbase-persistence/dependency-freeze.txt — tested package versions from the successful run

  • papermill result

    Executed 27/27 cells successfully with kernel vsc-langgraph-312.

    Local verification also created the required Couchbase bucket/scope/collections for this artifact run: test, langgraph, checkpoints, and checkpoint_writes.

Notes

  • This PR is intentionally scoped to the single langgraph/couchbase_persistence_langgraph.ipynb artifact.
  • The deprecation follow-up is now part of the artifact branch itself: the notebook uses create_agent instead of the older create_react_agent example while keeping the rest of the maintenance scope focused.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

Caution

Notebooks or Frontmatter Files Have Been Modified

  • Please ensure that a frontmatter.md file is accompanying the notebook file, and that the frontmatter is up to date.
  • These changes will be published to the developer portal tutorials only if frontmatter.md is included.
  • Proofread all changes before merging, as changes to notebook and frontmatter content will update the developer tutorial.

1 Notebook Files Modified:

Notebook File Frontmatter Included?
langgraph/couchbase_persistence_langgraph.ipynb

0 Frontmatter Files Modified:

Frontmatter File
Note: frontmatter will be checked and tested in the Test Frontmatter workflow.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Couchbase persistence notebook for LangGraph by adding support for langchain-openai, improving environment variable handling, and replacing hardcoded connection strings with configurable variables. The review feedback suggests refining the environment variable check in _set_env to correctly handle empty strings and recommends avoiding hardcoded default passwords to improve security practices.

Comment thread langgraph/couchbase_persistence_langgraph.ipynb
Comment thread langgraph/couchbase_persistence_langgraph.ipynb
Copy link
Copy Markdown
Contributor

@ejscribner ejscribner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we can, lets get this up to date so we avoid the deprecation

Comment thread langgraph/couchbase_persistence_langgraph.ipynb Outdated
@dex-the-ai
Copy link
Copy Markdown
Contributor Author

Owner ping for this maintenance PR: @teetangh @VirajAgarwal1

Requesting review from the manifest-listed owner(s) where GitHub does not already show a pending review request.

@VirajAgarwal1
Copy link
Copy Markdown
Contributor

VirajAgarwal1 commented May 4, 2026

lgtm 🚀
Thanks @dex-the-ai and @ejscribner
Dex helps out a ton!!

@ejscribner ejscribner merged commit fb3dc25 into main May 4, 2026
5 checks passed
@ejscribner ejscribner deleted the artifact/langgraph-couchbase-persistence-2026-04-28 branch May 4, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants